
package entity.SCM;

import entity.CRM.SaleOrder;
import entity.FRM.CustomerInvoice;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

@Entity
public class DeliveryOrder implements Serializable {
  
    public enum State {Pending,Success,Deleted}
    
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String deliveryDate;
    private State deliveryState;
    private Double totalPrice;
    
    @OneToOne
    private SaleOrder saleOrder;
    
    @OneToOne
    private PickingOrder pickingOrder;
    
    @OneToOne
    private PackingOrder packingOrder;
    
    @OneToOne
    private ShippingOrder shippingOrder;
    
    @OneToMany
    private List<ProductLine> productLines = new ArrayList<ProductLine>();
    
    @OneToOne
    private CustomerInvoice customerInvoice;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDeliveryDate() {
        return deliveryDate;
    }

    public void setDeliveryDate(String deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public State getDeliveryState() {
        return deliveryState;
    }

    public void setDeliveryState(State deliveryState) {
        this.deliveryState = deliveryState;
    }

    public PickingOrder getPickingOrder() {
        return pickingOrder;
    }

    public void setPickingOrder(PickingOrder pickingOrder) {
        this.pickingOrder = pickingOrder;
    }

    public SaleOrder getSaleOrder() {
        return saleOrder;
    }

    public void setSaleOrder(SaleOrder saleOrder) {
        this.saleOrder = saleOrder;
    }

    public PackingOrder getPackingOrder() {
        return packingOrder;
    }

    public void setPackingOrder(PackingOrder packingOrder) {
        this.packingOrder = packingOrder;
    }

    public ShippingOrder getShippingOrder() {
        return shippingOrder;
    }

    public void setShippingOrder(ShippingOrder shippingOrder) {
        this.shippingOrder = shippingOrder;
    }

    public List<ProductLine> getProductLines() {
        return productLines;
    }

    public void setProductLines(List<ProductLine> productLines) {
        this.productLines = productLines;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public CustomerInvoice getCustomerInvoice() {
        return customerInvoice;
    }

    public void setCustomerInvoice(CustomerInvoice customerInvoice) {
        this.customerInvoice = customerInvoice;
    }
    
    
}
